url = 'https://www.acwing.com/problem/content/4947/'
a,b = map(int,input().split())

r = min(a,b)
r2 = int(abs(a-b)/2)

print("{} {:.0f}".format(r,r2))